<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>优惠券页面</title>
    <link rel="stylesheet" type="text/css" href="${ctxPath}/static/assets/aui/css/aui.css" />
    <!-- jQuery Include -->
    <script type="text/javascript" src="${ctxPath}/static/assets/scripts/jquery.min.js"></script>
    <style>
        #coupon{
            font-size: 14px;
        }
        .aui-btn.aui-btn-danger{
            font-size: 14px;
        }
    </style>
</head>
<body>
<ul class="aui-list aui-form-list">
    <li >
        <header class="aui-bar aui-bar-nav" >
            <a class="aui-pull-left aui-btn" id="retn">
                <span class="aui-iconfont aui-icon-left"></span>返回
            </a>
            <div class="aui-title">优惠券</div>
        </header>
    </li>
    <li class="aui-list-item">
        <div class="aui-list-item-inner">
            <div class="aui-list-item-input">
                <input type="text" placeholder="请输入优惠券激活码" name="coupon" id="coupon" maxlength="80">
            </div>
            <div class="aui-list-item-label-icon">
                <div class="aui-btn aui-btn-danger aui-margin-l-5" onclick="toActivation()">激活</div>
            </div>
        </div>
    </li>
</ul>
<div style="text-align: center;height: 2rem;width: 100%;font-size: 14px;color: gray;margin-top: 1rem;">
    <i class="aui-iconfont aui-icon-info"></i>&nbsp;&nbsp;暂时没有可使用的优惠券
</div>
</body>
<script type="text/javascript" src="${ctxPath}/static/assets/aui/script/aui-toast.js"></script>
<script>
    var  user=localStorage.getItem("userInfo");//以“key”为名称存储一个值“value”
    if(!user){
        location.href="${ctxPath}/wechat/public/toLoginPage";//未实现
    }
    $("#img").show();
    var obj = JSON.parse(user); // --> parse error

    function toActivation() {
        apiready = function(){
            api.parseTapmode();
        }
        var toast = new auiToast({
        })
        toast.fail({
            title:"优惠券无效",
            duration:2000
        });
    }
    $("#retn").click(function(){
        location.href ="${ctxPath}/wechat/public/toMinePage";
    })
</script>
</html>